<template>
	<navigator class="books-item" :url="'/pages/goods/show?id='+book.id" >
		<u-image class="u-skeleton-fillet" width="100%" height="300rpx" :src="book.img ? vuex_user.store + book.img : null"></u-image>
		<view class="title u-line-1 u-skeleton-rect">{{book.name ? book.name : '商品名称'}}</view>
		<view class="u-flex u-row-between">
			<view class="price u-skeleton-rect">￥{{book.price}}</view>
			<view class="sales u-skeleton-rect">销量：{{book.saleCount}}</view>
		</view>
	</navigator>
	
</template>

<script>
	export default {
		name:"books-card",
		props:{
			book:{
				type:Object,
				default(){
					return {}
				}
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss" scoped>
	.books-item{
		padding: 40rpx;
		margin-top: 30rpx;
		box-shadow: 0 12rpx 20rpx 0 rgba(0,0,0, .1);
		.title{
			margin: 10rpx 0;
			font-weight: 500;
			font-size: 32rpx;
			width: 100%;
		}
		.price{
			color: #B50E03;
			
		}
		.sales{
			color:#888;
			
			font-size: 20rpx;
			
		}
	}
	
</style>
